﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
using OS.Common.Core;
using OS.Common.Enums;
using OS.Orm;

namespace ConsoleApp1
{
    /// <inheritdoc />
    /// <summary>
    /// 基础上下文
    /// </summary>
    public class BaseContext : BaseRepository
    {
        /// <inheritdoc />
        /// <summary>
        /// 重写父类连接数据库方法以便连接不同的数据库
        /// </summary>
        /// <param name="connectionString">数据库连接字符串</param>
        /// <returns></returns>
        protected override IDbConnection GetConnection(string connectionString)
        {
            return new MySqlConnection(connectionString);
        }
    }
}